<? if(!defined('IN_TIPASK')) exit('Access Denied'); ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"><? $user=$this->user; $setting=$this->setting; ?><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Tipask's Control Panel</title>
<meta http-equiv="Content-Type" content="text/html; charset=<?=TIPASK_CHARSET?>">
<link media="all" type="text/css" href="css/common/admin/admincp.css" rel="stylesheet"/>
<script src="js/jquery.js" type="text/javascript"></script>
</head>
<body>

<div id="append">
</div>

<div class="container"><? if(isset($message)) { $type=isset($type)?$type:'correctmsg';  ?><div  class="<?=$type?>"><p><?=$message?></p></div><? } ?><div class="mainbox nomargin">
<form action="index.php?admin_setting/static<?=$setting['seo_suffix']?>" method="post">
<table class="opt">
<tr>
<th colspan="2">问题生成html纯静态:</th>
</tr>
<tr>
<td>
<input class="radio"  type="radio"  <? if(1==$setting['static_on'] ) { ?>checked<? } ?>  value="1" name="static_on"><label for="yes">是</label>
<input class="radio"  type="radio"  <? if(0==$setting['static_on'] ) { ?>checked<? } ?> value="0" name="static_on"><label for="no">否</label>
</td>
<td valign="top">纯静态后，浏览等相关权限将失去作用。</td>
</tr>
<tr>
<th colspan="2"> 问题地址命名规则:</th>
</tr>
<tr>
<td valign="top">
<input class="txt" value="<?=$setting['static_url']?>" name="static_url" style="width: 332px;">
</td>
<td  valign="top">
Y、M、D 年月日<br/>
timestamp INT类型的UNIX时间戳<br/>
qid 文章ID<br/>
pinyin 拼音+文章ID<br/>
py 拼音部首+文章ID<br/>
typedir 分类目录<br/>
cc 日期+md5(文章ID)<br/>
</td>
</tr>

<tr>
<th colspan="2">初始化qid范围:</th>
</tr>
<tr>
<td>
 从<input class="txt" id="static_minqid"  name="static_minqid" style="width: 80px;" value="<?=$setting['static_minqid']?>">到 <input class="txt"  id="static_maxqid"  name="static_maxqid" style="width: 80px;" value="<?=$setting['static_maxqid']?>">
</td>
<td valign="top">每次改动了问题地址规则后都需要重新初始化。</td>
</tr><? if(1==$setting['static_on'] ) { ?><tr>
<td colspan="2">
  	<input class="btn" tabindex="3" type="button" value="开始初始化"  onclick="makehtm();" >
</td>
</tr><? } ?><tr>
<td colspan="2" id="initmsg"></td>
</tr>
</table>
<div class="opt"><br/><br/><br/><br/><br/><input class="btn" tabindex="3" type="submit" value=" 提 交 " name="submit"></div>
</form>
</div>
</div>
<script type="text/javascript">
function makehtm(){
minqid=parseInt($('#static_minqid').val());
maxqid=parseInt($('#static_maxqid').val());
if( isNaN(minqid) || isNaN(maxqid) || (minqid<1) || (minqid>maxqid) ){
alert('请输入正确的qid的范围');
return;
}
window.location="index.php?admin_setting/htm/"+minqid+"/"+maxqid+"/"+minqid+"<?=$setting['seo_suffix']?>";
}
</script>
</body>

</html>
